package com.dataart.training.crimequalification.service;

import com.dataart.training.crimequalification.dao.ObjectiveSideDAO;
import com.dataart.training.crimequalification.entity.ActFeatureEntity;
import com.dataart.training.crimequalification.entity.CriminalActEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ObjectiveSideServiceImpl implements ObjectiveSideService {

    //--------------------------------------------------------------

    @Autowired
    private ObjectiveSideDAO objectiveSideDAO;

    //--------------------------------------------------------------

    /**
     * @return
     */
    @Override
    public List<CriminalActEntity> getAllCriminalActs() {
        return objectiveSideDAO.getAllCriminalActs();
    }

    /**
     * @return
     */
    @Override
    public List<ActFeatureEntity> getAllActFeatures() {
        return objectiveSideDAO.getAllActFeatures();
    }

    /**
     * @param codename
     * @return
     */
    @Override
    public CriminalActEntity getCriminalActByCodeName(String codename) {
        return objectiveSideDAO.getCriminalActByCodeName(codename);
    }

    /**
     * @param codename
     * @return
     */
    @Override
    public ActFeatureEntity getAllActFeaturesByCodename(String codename) {
        return objectiveSideDAO.getAllActFeaturesByCodename(codename);
    }
}
